Integrand size = 14, antiderivative size = 158 \[ \int (c+d x)^4 \tan (a+b x) \, dx=\frac {i (c+d x)^5}{5 d}-\frac {(c+d x)^4 \log \left (1+e^{2 i (a+b x)}\right )}{b}+\frac {2 i d (c+d x)^3 \operatorname {PolyLog}\left (2,-e^{2 i (a+b x)}\right )}{b^2}-\frac {3 d^2 (c+d x)^2 \operatorname {PolyLog}\left (3,-e^{2 i (a+b x)}\right )}{b^3}-\frac {3 i d^3 (c+d x) \operatorname {PolyLog}\left (4,-e^{2 i (a+b x)}\right )}{b^4}+\frac {3 d^4 \operatorname {PolyLog}\left (5,-e^{2 i (a+b x)}\right )}{2 b^5} \]
[Out]
Time = 0.25 (sec) , antiderivative size = 158, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.429, Rules used = {3800, 2221, 2611, 6744, 2320, 6724} \[ \int (c+d x)^4 \tan (a+b x) \, dx=\frac {3 d^4 \operatorname {PolyLog}\left (5,-e^{2 i (a+b x)}\right )}{2 b^5}-\frac {3 i d^3 (c+d x) \operatorname {PolyLog}\left (4,-e^{2 i (a+b x)}\right )}{b^4}-\frac {3 d^2 (c+d x)^2 \operatorname {PolyLog}\left (3,-e^{2 i (a+b x)}\right )}{b^3}+\frac {2 i d (c+d x)^3 \operatorname {PolyLog}\left (2,-e^{2 i (a+b x)}\right )}{b^2}-\frac {(c+d x)^4 \log \left (1+e^{2 i (a+b x)}\right )}{b}+\frac {i (c+d x)^5}{5 d} \]
[In]
[Out]
Rule 2221
Rule 2320
Rule 2611
Rule 3800
Rule 6724
Rule 6744
Rubi steps \begin{align*} \text {integral}& = \frac {i (c+d x)^5}{5 d}-2 i \int \frac {e^{2 i (a+b x)} (c+d x)^4}{1+e^{2 i (a+b x)}} \, dx \\ & = \frac {i (c+d x)^5}{5 d}-\frac {(c+d x)^4 \log \left (1+e^{2 i (a+b x)}\right )}{b}+\frac {(4 d) \int (c+d x)^3 \log \left (1+e^{2 i (a+b x)}\right ) \, dx}{b} \\ & = \frac {i (c+d x)^5}{5 d}-\frac {(c+d x)^4 \log \left (1+e^{2 i (a+b x)}\right )}{b}+\frac {2 i d (c+d x)^3 \operatorname {PolyLog}\left (2,-e^{2 i (a+b x)}\right )}{b^2}-\frac {\left (6 i d^2\right ) \int (c+d x)^2 \operatorname {PolyLog}\left (2,-e^{2 i (a+b x)}\right ) \, dx}{b^2} \\ & = \frac {i (c+d x)^5}{5 d}-\frac {(c+d x)^4 \log \left (1+e^{2 i (a+b x)}\right )}{b}+\frac {2 i d (c+d x)^3 \operatorname {PolyLog}\left (2,-e^{2 i (a+b x)}\right )}{b^2}-\frac {3 d^2 (c+d x)^2 \operatorname {PolyLog}\left (3,-e^{2 i (a+b x)}\right )}{b^3}+\frac {\left (6 d^3\right ) \int (c+d x) \operatorname {PolyLog}\left (3,-e^{2 i (a+b x)}\right ) \, dx}{b^3} \\ & = \frac {i (c+d x)^5}{5 d}-\frac {(c+d x)^4 \log \left (1+e^{2 i (a+b x)}\right )}{b}+\frac {2 i d (c+d x)^3 \operatorname {PolyLog}\left (2,-e^{2 i (a+b x)}\right )}{b^2}-\frac {3 d^2 (c+d x)^2 \operatorname {PolyLog}\left (3,-e^{2 i (a+b x)}\right )}{b^3}-\frac {3 i d^3 (c+d x) \operatorname {PolyLog}\left (4,-e^{2 i (a+b x)}\right )}{b^4}+\frac {\left (3 i d^4\right ) \int \operatorname {PolyLog}\left (4,-e^{2 i (a+b x)}\right ) \, dx}{b^4} \\ & = \frac {i (c+d x)^5}{5 d}-\frac {(c+d x)^4 \log \left (1+e^{2 i (a+b x)}\right )}{b}+\frac {2 i d (c+d x)^3 \operatorname {PolyLog}\left (2,-e^{2 i (a+b x)}\right )}{b^2}-\frac {3 d^2 (c+d x)^2 \operatorname {PolyLog}\left (3,-e^{2 i (a+b x)}\right )}{b^3}-\frac {3 i d^3 (c+d x) \operatorname {PolyLog}\left (4,-e^{2 i (a+b x)}\right )}{b^4}+\frac {\left (3 d^4\right ) \text {Subst}\left (\int \frac {\operatorname {PolyLog}(4,-x)}{x} \, dx,x,e^{2 i (a+b x)}\right )}{2 b^5} \\ & = \frac {i (c+d x)^5}{5 d}-\frac {(c+d x)^4 \log \left (1+e^{2 i (a+b x)}\right )}{b}+\frac {2 i d (c+d x)^3 \operatorname {PolyLog}\left (2,-e^{2 i (a+b x)}\right )}{b^2}-\frac {3 d^2 (c+d x)^2 \operatorname {PolyLog}\left (3,-e^{2 i (a+b x)}\right )}{b^3}-\frac {3 i d^3 (c+d x) \operatorname {PolyLog}\left (4,-e^{2 i (a+b x)}\right )}{b^4}+\frac {3 d^4 \operatorname {PolyLog}\left (5,-e^{2 i (a+b x)}\right )}{2 b^5} \\ \end{align*}
Time = 0.16 (sec) , antiderivative size = 157, normalized size of antiderivative = 0.99 \[ \int (c+d x)^4 \tan (a+b x) \, dx=\frac {i (c+d x)^5}{5 d}-\frac {(c+d x)^4 \log \left (1+e^{2 i (a+b x)}\right )}{b}+\frac {2 i d (c+d x)^3 \operatorname {PolyLog}\left (2,-e^{2 i (a+b x)}\right )}{b^2}-\frac {3 d^2 \left (2 b^2 (c+d x)^2 \operatorname {PolyLog}\left (3,-e^{2 i (a+b x)}\right )+d \left (2 i b (c+d x) \operatorname {PolyLog}\left (4,-e^{2 i (a+b x)}\right )-d \operatorname {PolyLog}\left (5,-e^{2 i (a+b x)}\right )\right )\right )}{2 b^5} \]
[In]
[Out]
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 624 vs. \(2 (141 ) = 282\).
Time = 1.24 (sec) , antiderivative size = 625, normalized size of antiderivative = 3.96
method | result | size |
risch | \(\frac {4 i d \,c^{3} a^{2}}{b^{2}}+\frac {2 i d \,c^{3} \operatorname {polylog}\left (2, -{\mathrm e}^{2 i \left (x b +a \right )}\right )}{b^{2}}-\frac {8 i d^{2} c^{2} a^{3}}{b^{3}}+2 i d \,c^{3} x^{2}-\frac {6 d^{3} c \operatorname {polylog}\left (3, -{\mathrm e}^{2 i \left (x b +a \right )}\right ) x}{b^{3}}-\frac {8 c \,d^{3} a^{3} \ln \left ({\mathrm e}^{i \left (x b +a \right )}\right )}{b^{4}}+i d^{3} c \,x^{4}-\frac {d^{4} \ln \left ({\mathrm e}^{2 i \left (x b +a \right )}+1\right ) x^{4}}{b}+\frac {2 d^{4} a^{4} \ln \left ({\mathrm e}^{i \left (x b +a \right )}\right )}{b^{5}}-\frac {2 i d^{4} a^{4} x}{b^{4}}-\frac {3 i d^{4} \operatorname {polylog}\left (4, -{\mathrm e}^{2 i \left (x b +a \right )}\right ) x}{b^{4}}+\frac {12 c^{2} d^{2} a^{2} \ln \left ({\mathrm e}^{i \left (x b +a \right )}\right )}{b^{3}}-\frac {8 c^{3} d a \ln \left ({\mathrm e}^{i \left (x b +a \right )}\right )}{b^{2}}-\frac {6 d^{2} c^{2} \ln \left ({\mathrm e}^{2 i \left (x b +a \right )}+1\right ) x^{2}}{b}-\frac {4 d^{3} c \ln \left ({\mathrm e}^{2 i \left (x b +a \right )}+1\right ) x^{3}}{b}-\frac {4 d \,c^{3} \ln \left ({\mathrm e}^{2 i \left (x b +a \right )}+1\right ) x}{b}+\frac {2 i d^{4} \operatorname {polylog}\left (2, -{\mathrm e}^{2 i \left (x b +a \right )}\right ) x^{3}}{b^{2}}+\frac {6 i d^{3} c \,a^{4}}{b^{4}}-\frac {3 i d^{3} c \operatorname {polylog}\left (4, -{\mathrm e}^{2 i \left (x b +a \right )}\right )}{b^{4}}-\frac {3 d^{2} c^{2} \operatorname {polylog}\left (3, -{\mathrm e}^{2 i \left (x b +a \right )}\right )}{b^{3}}-\frac {3 d^{4} \operatorname {polylog}\left (3, -{\mathrm e}^{2 i \left (x b +a \right )}\right ) x^{2}}{b^{3}}-\frac {8 i d^{4} a^{5}}{5 b^{5}}+2 i d^{2} c^{2} x^{3}+\frac {6 i d^{2} c^{2} \operatorname {polylog}\left (2, -{\mathrm e}^{2 i \left (x b +a \right )}\right ) x}{b^{2}}+\frac {8 i d \,c^{3} x a}{b}+\frac {8 i d^{3} c \,a^{3} x}{b^{3}}+\frac {6 i d^{3} c \operatorname {polylog}\left (2, -{\mathrm e}^{2 i \left (x b +a \right )}\right ) x^{2}}{b^{2}}-\frac {12 i d^{2} c^{2} a^{2} x}{b^{2}}-i c^{4} x -\frac {i c^{5}}{5 d}-\frac {c^{4} \ln \left ({\mathrm e}^{2 i \left (x b +a \right )}+1\right )}{b}+\frac {2 c^{4} \ln \left ({\mathrm e}^{i \left (x b +a \right )}\right )}{b}+\frac {i d^{4} x^{5}}{5}+\frac {3 d^{4} \operatorname {polylog}\left (5, -{\mathrm e}^{2 i \left (x b +a \right )}\right )}{2 b^{5}}\) | \(625\) |
[In]
[Out]
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 1410 vs. \(2 (137) = 274\).
Time = 0.31 (sec) , antiderivative size = 1410, normalized size of antiderivative = 8.92 \[ \int (c+d x)^4 \tan (a+b x) \, dx=\text {Too large to display} \]
[In]
[Out]
\[ \int (c+d x)^4 \tan (a+b x) \, dx=\int \left (c + d x\right )^{4} \sin {\left (a + b x \right )} \sec {\left (a + b x \right )}\, dx \]
[In]
[Out]
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 803 vs. \(2 (137) = 274\).
Time = 0.41 (sec) , antiderivative size = 803, normalized size of antiderivative = 5.08 \[ \int (c+d x)^4 \tan (a+b x) \, dx=-\frac {15 \, c^{4} \log \left (-\sin \left (b x + a\right )^{2} + 1\right ) - \frac {60 \, a c^{3} d \log \left (-\sin \left (b x + a\right )^{2} + 1\right )}{b} + \frac {90 \, a^{2} c^{2} d^{2} \log \left (-\sin \left (b x + a\right )^{2} + 1\right )}{b^{2}} - \frac {60 \, a^{3} c d^{3} \log \left (-\sin \left (b x + a\right )^{2} + 1\right )}{b^{3}} + \frac {15 \, a^{4} d^{4} \log \left (-\sin \left (b x + a\right )^{2} + 1\right )}{b^{4}} + \frac {2 \, {\left (-3 i \, {\left (b x + a\right )}^{5} d^{4} - 15 \, {\left (i \, b c d^{3} - i \, a d^{4}\right )} {\left (b x + a\right )}^{4} - 45 \, d^{4} {\rm Li}_{5}(-e^{\left (2 i \, b x + 2 i \, a\right )}) - 30 \, {\left (i \, b^{2} c^{2} d^{2} - 2 i \, a b c d^{3} + i \, a^{2} d^{4}\right )} {\left (b x + a\right )}^{3} - 30 \, {\left (i \, b^{3} c^{3} d - 3 i \, a b^{2} c^{2} d^{2} + 3 i \, a^{2} b c d^{3} - i \, a^{3} d^{4}\right )} {\left (b x + a\right )}^{2} - 10 \, {\left (-3 i \, {\left (b x + a\right )}^{4} d^{4} + 8 \, {\left (-i \, b c d^{3} + i \, a d^{4}\right )} {\left (b x + a\right )}^{3} + 9 \, {\left (-i \, b^{2} c^{2} d^{2} + 2 i \, a b c d^{3} - i \, a^{2} d^{4}\right )} {\left (b x + a\right )}^{2} + 6 \, {\left (-i \, b^{3} c^{3} d + 3 i \, a b^{2} c^{2} d^{2} - 3 i \, a^{2} b c d^{3} + i \, a^{3} d^{4}\right )} {\left (b x + a\right )}\right )} \arctan \left (\sin \left (2 \, b x + 2 \, a\right ), \cos \left (2 \, b x + 2 \, a\right ) + 1\right ) - 30 \, {\left (i \, b^{3} c^{3} d - 3 i \, a b^{2} c^{2} d^{2} + 3 i \, a^{2} b c d^{3} + 2 i \, {\left (b x + a\right )}^{3} d^{4} - i \, a^{3} d^{4} + 4 \, {\left (i \, b c d^{3} - i \, a d^{4}\right )} {\left (b x + a\right )}^{2} + 3 \, {\left (i \, b^{2} c^{2} d^{2} - 2 i \, a b c d^{3} + i \, a^{2} d^{4}\right )} {\left (b x + a\right )}\right )} {\rm Li}_2\left (-e^{\left (2 i \, b x + 2 i \, a\right )}\right ) + 5 \, {\left (3 \, {\left (b x + a\right )}^{4} d^{4} + 8 \, {\left (b c d^{3} - a d^{4}\right )} {\left (b x + a\right )}^{3} + 9 \, {\left (b^{2} c^{2} d^{2} - 2 \, a b c d^{3} + a^{2} d^{4}\right )} {\left (b x + a\right )}^{2} + 6 \, {\left (b^{3} c^{3} d - 3 \, a b^{2} c^{2} d^{2} + 3 \, a^{2} b c d^{3} - a^{3} d^{4}\right )} {\left (b x + a\right )}\right )} \log \left (\cos \left (2 \, b x + 2 \, a\right )^{2} + \sin \left (2 \, b x + 2 \, a\right )^{2} + 2 \, \cos \left (2 \, b x + 2 \, a\right ) + 1\right ) - 30 \, {\left (-2 i \, b c d^{3} - 3 i \, {\left (b x + a\right )} d^{4} + 2 i \, a d^{4}\right )} {\rm Li}_{4}(-e^{\left (2 i \, b x + 2 i \, a\right )}) + 15 \, {\left (3 \, b^{2} c^{2} d^{2} - 6 \, a b c d^{3} + 6 \, {\left (b x + a\right )}^{2} d^{4} + 3 \, a^{2} d^{4} + 8 \, {\left (b c d^{3} - a d^{4}\right )} {\left (b x + a\right )}\right )} {\rm Li}_{3}(-e^{\left (2 i \, b x + 2 i \, a\right )})\right )}}{b^{4}}}{30 \, b} \]
[In]
[Out]
\[ \int (c+d x)^4 \tan (a+b x) \, dx=\int { {\left (d x + c\right )}^{4} \sec \left (b x + a\right ) \sin \left (b x + a\right ) \,d x } \]
[In]
[Out]
Timed out. \[ \int (c+d x)^4 \tan (a+b x) \, dx=\int \frac {\sin \left (a+b\,x\right )\,{\left (c+d\,x\right )}^4}{\cos \left (a+b\,x\right )} \,d x \]
[In]
[Out]